#include "PrecompiledHeader.h"
#include "FogPPFX.h"

/*--------------------------------------------------------------------------*/

FogPPFX::FogPPFX() :
	IPostprocess(g_Material->GetMaterial("mat_fog_ppfx"))
{
	this->m_density = 0.0005f;
	this->m_distance = 100.0f;
	this->m_color = Color::Red;
}

/*--------------------------------------------------------------------------*/

FogPPFX::~FogPPFX()
{

}

/*--------------------------------------------------------------------------*/

void FogPPFX::UploadParameters()
{
	glm::vec4 v = glm::vec4(this->m_density, this->m_distance, 0.0f, 0.0f);
	ROpenGL::SetUniformBufferValue(g_Renderer->GetUniformBuffer(EUbo::Postprocess), EUboPostprocess::Var_0, &v);
	ROpenGL::SetUniformBufferValue(g_Renderer->GetUniformBuffer(EUbo::Postprocess), EUboPostprocess::Var_1, &this->m_color);
}

/*--------------------------------------------------------------------------*/
